<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
<%@ include file="/admin/include/init_admin.jsp" %>
<%@ page import="com.welfare.admin.system.*" %>
<%

	String s_popup_name		= StringUtil.nvl(request.getParameter("s_popup_name"));



	HashMap infos = new HashMap();
	infos.put("popup_name",	s_popup_name);
 
	SystemDAO dao 	= new SystemDAO();
	HashList list 	= dao.selectPopupList(infos);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title><%= SYSTEM_NAME %></title>
	<%@ include file="/admin/include/cssnjs.jsp"  %>
	<script type="text/javascript">
	$(document).ready(function() {
		$('#s_popup_name').focus().select();
		$('#list').find('tr').hover(
				function () { $(this).addClass("hover"); }
			  , function () { $(this).removeClass("hover"); }
			)
			.click(function(){
				document.location.href = './popupDetail.jsp?popup_id=' + $(this).attr('id');
			});

	});
	
	
	function fnCallBackSearch(strAction) {
		$('#searchForm').attr('action', strAction);
		$('#searchForm').submit();
	}

	function fnOpenDocument(docuId) {
		cfOpen('./documentDetail.jsp?docu_id='+nvl(docuId), 'win_document', 500, 240);
	}
	</script>
</head>
<body>
<div id="wrap">
	<div id="page">
		<div id="contents">
			<div class="menu_title">
				<h1>팝업관리</h1>
				<p>관리자 > 시스템관리 > <b>팝업관리</b></p>
			</div>
			<div class="clear line_01"></div>

			<form name="searchForm" id="searchForm" method="post" action="./popupList.jsp">
			
			<table cellpadding="0" cellspacing="0" class="table_01 mt15">
			<colgroup>
				<col width="100px" />
				<col  />
			</colgroup>
			<tr>
				<th><p>팝업명</p></th>
				<td class="brx">
					<input type="text" name="s_popup_name" id="s_popup_name" value="<%= s_popup_name %>" class="w120"/>
				</td>
			</tr>
			</table>

			<div class="mt10 mb10 r">
				<input type="image" class="button" src="../images/btn_search.gif"/>
				<a href="./popupDetail.jsp"><img src="../images/btn_new.gif"/></a>
			</div>

			</form>



			<div class="search_result">검색결과 : <%= list.size() %>건</div>

			
		    <table width="100%" cellpadding="0" cellspacing="0" class="table_04">
				<colgroup>
					<col width="80px"/>
					<col />
					<col width="100px"/>
					<col width="100px"/>
					<col width="100px"/>
					<col width="100px"/>
					<col width="160px"/>
				</colgroup>
				<thead>
					<tr>
						<th><p>No</p></th>
						<th><p>팝업명</p></th>
						<th><p>시작일</p></th> 
						<th><p>종료일</p></th> 
						<th><p>사용여부</p></th>
						<th><p>등록일</p></th>
						<th><p>등록자</p></th>
					</tr>
				</thead>
				<tbody id="list">
			<%	for (int i = 0; i < list.size(); i++) { %>
					<tr id="<%= list.get("popup_id", i) %>">
						<td><%= list.get("popup_id", i) %></td>
						<td><%= list.get("popup_name", i) %></td>
						<td><%= list.getDate("start_dt", i) %></td>
						<td><%= list.getDate("end_dt", i) %></td>
						<td><%= list.getDate("use_yn", i) %></td>
						<td><%= list.getDate("mod_date", i) %></td>
						<td><%= list.get("mod_user", i) %></td>
					</tr>
			<%	} %>
				</tbody>
			</table>
			
			
		</div>
	</div>
</div>
</body>
</html>
